<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>万虎CMS后台管理</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="__ADMINLTE__bootstrap/css/bootstrap.min.css">

<link rel="stylesheet" href="__ADMINLTE__bootstrap/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="__ADMINLTE__bootstrap/ionicons/css/ionicons.min.css">
<script type="text/javascript" src="__PLUGINS__/webuploader/jquery-1.10.2.min.js"></script>

<!-- Font Awesome 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    -->
<!-- Ionicons
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    --> 
<!-- Theme style -->
<link rel="stylesheet" href="__ADMINLTE__dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="__ADMINLTE__dist/css/skins/skin-blue.min.css">
<link rel="stylesheet" type="text/css" href="__PLUGINS__webuploader/webuploader.css">
<!-- test -->
<script src="__ADMINLTE__plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="__ADMINLTE__plugins/select2/select2.full.min.js"></script>
<link rel="stylesheet" href="__ADMINLTE__plugins/select2/select2.min.css">
<!-- test end -->
<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="__PLUGINS__ueditor/lang/zh-cn/zh-cn.js"></script>
<!-- chartjs -->
<script type="text/javascript" charset="utf-8" src="__PLUGINS__chartjs/js/Chart.min.js"></script>
<!-- chartjs END-->
<!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
{block name="css"}

{/block}
<style type="text/css">
.pagea{
    float: right;
}
.pagea .current{
    background:#337ab7;
    border: 1px solid #ddd;
    color: #fff;
    float: left;
    line-height: 1.42857;
    margin-left: -1px;
    padding: 6px 12px;
    position: relative;
    text-decoration: none;
}
.pagea a{
    background:#fafafa;
    border: 1px solid #ddd;
    color: #666;
    float: left;
    line-height: 1.42857;
    margin-left: -1px;
    padding: 6px 12px;
    position: relative;
    text-decoration: none;
}
.listorder{
    border: 1px solid #D0D0D0;
    height: 28px;
    margin: 0 5px 0 0;
    padding: 2px 0 2px 5px;
    border: 1px solid #d0d0d0;
    background: url("public/images/input.png") repeat-x scroll 0 0 #FFFFFF;
    font-size: 12px;
    border-radius: 3px;
}
.alink {
    color:#444;
}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <!-- Main Header -->
    <header class="main-header">

        <!-- Logo -->
        <a href="{:U('Index/index')}" class="logo">
            <span class="logo-mini"><b>W</b>MS</span>
            <span class="logo-lg"><b>Wanhu</b>CMS</span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
          </a>
          <!-- Navbar Right Menu -->
          <div class="navbar-custom-menu">
		  
            <ul class="nav navbar-nav">
			
			    <li class="dropdown user user-menu">
                <a href="{:U('index/Index/index')}" target="_blank">
                  <span class="hidden-xs">访问网站首页</span>
                </a>
              </li>
              <!-- User Account Menu -->
              <li class="dropdown user user-menu">
			    <?php
			    $user = M('user')->where('id='.session('id'))->find();
			    $group = M('authGroup')->where('id='.$user['group_id'])->find();
				?>
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <!-- <img src="__ADMINLTE__dist/img/user2-160x160.jpg" class="user-image" alt="User Image"> -->
                  <span class="hidden-xs">{$user['username']}</span>
                  <span class="hidden-xs">{$group['title']}</span>
                </a>
				
                <ul class="dropdown-menu">
                  <li class="user-header">
                    <img src="__ADMINLTE__dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
                    <p>
                      WanhuCMS
                      <small>since Nov. 2012</small>
                    </p>
                  </li>
                  <!-- Menu Footer-->
                  <li class="user-footer">
                    <div class="pull-left">
                      <a href="{:U('User/edit',array('id'=>session('id')))}" class="btn btn-default btn-flat">修改密码</a>
                    </div>
                    <div class="pull-right">
                      <a href="{:U('Sign/out')}" class="btn btn-default btn-flat">退出</a>
                    </div>
                  </li>
                </ul>
            </div>
        </nav>
    </header>
    <aside class="main-sidebar">
        <section class="sidebar">
            <ul class="sidebar-menu">

            <li class="header"><a href="{:U('Index/index')}"><i class="fa fa-home"></i>系统首页</a></li>  
           
		   <!-- 内容发布 -->
		    {if condition="authCheck('admin/content/addSliderContent',session('id'))"}
            <!-- <li class="{if (isset($active['addSliderContent']))}active{/if}"><a href="{:U('Content/addSliderContent')}"><i class="fa fa-edit"></i><span>内容发布</span> </a></li> -->
		    {/if}
		  <!-- 内容发布 END-->
		  
		   <!-- 内容管理 -->
		   {if condition="authCheck('admin/content/listindex',session('id'))"}
           <li class="{if (isset($active['content']))}active{/if}"><a href="{:U('Content/listindex')}"><i class="fa fa-align-right"></i><span>内容管理</span> </a></li>
		   {/if}
		   <!-- 内容管理 END-->
		   
		   <!-- 栏目管理 -->
		    {if condition="authCheck('admin/term/index',session('id'))"}
           <li class="{if (isset($active['term']))}active{/if}"><a href="{:U('Term/index')}"><i class="fa fa-list"></i><span>栏目管理</span></a></li>
		   {/if}
		   <!-- 栏目管理 END-->
		   
		   <!-- 添加栏目 -->
		    {if condition="authCheck('admin/term/addTerm',session('id'))"}
           <li class="{if (isset($active['addTerm']))}active{/if}"><a href="{:U('Term/addTerm')}"><i class="fa fa-plus-square"></i><span>添加栏目</span></a></li> 
			{/if}
		   <!-- 添加栏目 END-->
		   
			<!-- 营销 -->
			{if condition="authCheck('seo',session('id'))"}
			<li class="treeview {if (isset($active['seo']))}active{/if}">
              <a href="{:U('Term/index')}"><i class="fa fa-line-chart"></i><span>营销</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
			  {if condition="authCheck('admin/seoset/index',session('id'))"}
                <li class="{if (isset($active['seo']['seoset']))}active{/if}"><a href="{:U('Seoset/index')}">SEO</a></li>
			  {/if}
				{if condition="authCheck('admin/online/index',session('id'))"}
                  <li class="{if (isset($active['seo']['online']))}active{/if}"><a href="{:U('Online/index')}">客服</a></li>
			  {/if}
              </ul>
            </li>
			{/if}
			<!-- 营销 END-->
			
			
			<!-- 模型管理 -->
			{if condition="authCheck('manage',session('id'))"}
            {if (APP_DEVEL)}
			<li class="treeview {if (isset($active['model']))}active{/if}">
              <a href="{:U('Term/index')}"><i class="fa fa-table"></i><span>模型管理</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
			    {if condition="authCheck('admin/term_model/add',session('id'))"}
                <li class="{if (isset($active['model']['add']))}active{/if}"><a href="{:U('TermModel/add')}">添加模型</a></li>
				{/if}
				{if condition="authCheck('admin/term_model/index',session('id'))"}
                <li class="{if (isset($active['model']['index']))}active{/if}"><a href="{:U('TermModel/index')}">模型管理</a></li>
				{/if}
              </ul>
            </li>
            {/if}
            {/if}
			<!-- 模型管理 END-->
			
			
			<!-- 功能模块 -->
			{if condition="authCheck('function',session('id'))"}
			<li class="treeview {if (isset($active['function']))}active{/if}">
              <a href="#"><i class="fa fa-th-large"></i><span>功能模块</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
			   {if condition="authCheck('admin/links/index',session('id'))"}
                <li class="{if (isset($active['function']['links']))}active{/if}"><a href="{:U('Links/index')}">链接管理</a></li>
				{/if}
				{if condition="authCheck('admin/message/index',session('id'))"}
                <li class="{if (isset($active['function']['message']))}active{/if}"><a href="{:U('Message/index')}">留言管理</a></li>
				{/if}
                <li class="{if (isset($active['function']['message']))}active{/if}"><a href="{:U('Album/index')}">相册管理</a></li>        
              </ul>
            </li>
			{/if}
			<!-- 功能模块 END-->
			
			
			
           <!-- 安全与效率 -->
		   {if condition="authCheck('efficiency',session('id'))"}
            <li class="treeview {if (isset($active['efficiency']))}active{/if}">
              <a href="#"><i class="fa fa-area-chart"></i><span>安全与效率</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
			   {if condition="authCheck('admin/links/index',session('id'))"}
                <li class="{if (isset($active['efficiency']['safe']))}active{/if}"><a href="{:U('System/safe')}">系统安全</a></li>
				{/if}
				{if condition="authCheck('admin/system/index',session('id'))"}
                  <li class="{if (isset($active['efficiency']['upload']))}active{/if}"><a href="{:U('System/index')}">检测更新</a></li>
				{/if}
        <li class="{if (isset($active['efficiency']['safe']))}active{/if}"><a href="{:U('System/remove')}">远程附件</a></li>
				{if condition="authCheck('admin/get_db/index',session('id'))"}
                <li class="{if (isset($active['efficiency']['GetDb']))}active{/if}"><a href="{:U('GetDb/index',array('method'=>'index'))}">数据库备份</a></li>
				{/if}
				{if condition="authCheck('admin/user/manage_log',session('id'))"}
                <li class="{if (isset($active['efficiency']['log']))}active{/if}"><a href="{:U('User/manage_log')}">后台操作日志</a></li>
                {/if}
              </ul>
            </li>
			{/if}
             <!-- 安全与效率 END-->
			
			<!-- 系统设置-->
			 {if condition="authCheck('fit',session('id'))"}
			<li class="treeview {if (isset($active['fit']))}active{/if}">
              <a href="#"><i class="fa fa-gear"></i><span>系统设置</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
                {if condition="authCheck('admin/option/index',session('id'))"}
                  <li class="{if (isset($active['fit']['option']))}active{/if}"> <a href="{:U('Option/index')}"><span>网站设置</span></a></li>
				{/if}
				{if condition="authCheck('admin/user/index',session('id'))"}
                  <li class="{if (isset($active['fit']['user']))}active{/if}"><a href="{:U('User/index')}">管理员设置</a></li>
				{/if}
				{if condition="authCheck('admin/user/group',session('id'))"}
                  <li class="{if (isset($active['fit']['group']))}active{/if}"><a href="{:U('User/group')}">用户组设置</a></li>
				{/if}
				{if condition="authCheck('admin/access/rule_add',session('id'))"}
                  <li class="{if (isset($active['fit']['rule']))}active{/if}"><a href="{:U('Access/rule_add')}">后台增权限</a></li>
				{/if}
                <li class="{if (isset($active['efficiency']['log']))}active{/if}"><a href="{:U('Option/sendmsg')}">短信接口设置</a></li>
              </ul>
            </li>
			{/if}


        <!-- 优惠券模块 -->
      <li class="treeview {if (isset($active['function']))}active{/if}">
              <a href="#"><i class="fa fa-money"></i><span>优惠券模块</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
                <li class="{if (isset($active['efficiency']['tocheck']))}active{/if}"><a href="{:U('Coupon/tocheck')}">优惠券核对信息</a></li>
                <li class="{if (isset($active['efficiency']['index']))}active{/if}"><a href="{:U('Coupon/index')}">领取优惠券列表</a></li>
                <li class="{if (isset($active['efficiency']['list_yi_coupon']))}active{/if}"><a href="{:U('Coupon/list_yi_coupon')}">已使用优惠券列表</a></li>
                <li class="{if (isset($active['efficiency']['list_wei_coupon']))}active{/if}"><a href="{:U('Coupon/list_wei_coupon')}">未使用优惠券列表</a></li>
                <li class="{if (isset($active['efficiency']['generate']))}active{/if}"><a href="{:U('Coupon/generate')}">生成优惠券</a></li>
                <li class="{if (isset($active['efficiency']['grant']))}active{/if}"><a href="{:U('Coupon/grant')}">发放优惠券</a></li>
              </ul>
            </li>
      <!-- 优惠券模块 END-->

        <!-- 优惠券模块 -->
      <li class="treeview {if (isset($active['function']))}active{/if}">
              <a href="#"><i class="fa  fa-user"></i><span>会员模块</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
                <li class=""><a href="{:U('Member/index')}">会员列表</a></li>
                <li class=""><a href="{:U('Member/add')}">添加会员</a></li>
                <li class=""><a href="{:U('Member/notice_jiangjia')}">降价通知</a></li>
                <li class=""><a href="{:U('Member/notice_kaipan')}">开盘通知</a></li>
               
              </ul>
      </li>
      <!-- 优惠券模块 END--> 
        <!-- 财务模块 -->
      <li class="treeview {if (isset($active['function']))}active{/if}">
              <a href="#"><i class="fa  fa-calculator"></i><span>财务模块</span> <i class="fa fa-angle-left pull-right"></i></a>
              <ul class="treeview-menu">
                <li class=""><a href="{:U('Coupon/zhifu_weichat')}">微信支付账单</a></li>
                <li class=""><a href="{:U('Coupon/zhifu_alipay')}">支付宝支付账单</a></li>
                <li class=""><a href="{:U('Coupon/zhifu_wei')}">待支付订单列表</a></li>
              </ul>
      </li>
      <!-- 财务模块 END-->      
      <!-- 系统设置 END-->
      {if condition="authCheck('admin/system/clear_cache',session('id'))"}
      <li class="treeview {if (isset($active['clear_cache']))}active{/if}">
              <a href="{:U('System/clear_cache')}"><i class="fa fa-refresh"></i><span>清除缓存</span></a>
            </li>
      {/if}
      <li class="treeview {if (isset($active['sitemap']))}active{/if}">
              <a href="{:U('System/createSitemap')}"><i class="fa fa-paperclip"></i><span>生成sitemap</span></a>
      </li>
          </ul>
        </section>
      </aside>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        {block name="content"}
        {/block}
    </div>
    <!-- /.content-wrapper -->
    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            WanhuCMS，让世界更了解你
        </div>
        <!-- Default to the left -->
        <strong>Copyright &copy; 2016 <a href="http://www.wanhunet.com" class="alink">Wanhunet</a>.All rights reserved.</strong> 
    </footer>

    <div class="control-sidebar-bg"></div>
</div>
<script src="__ADMINLTE__plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="__ADMINLTE__plugins/select2/select2.full.min.js"></script>
<script src="__ADMINLTE__bootstrap/js/bootstrap.min.js"></script>
<!--
<script src="__ADMINLTE__bootstrap/js/qiniu.js"></script>
-->
<script src="__ADMINLTE__dist/js/app.min.js"></script>
<script type="text/javascript" src="__PLUGINS__webuploader/webuploader.html5only.min.js"></script>
<script type="text/javascript" src="__PLUGINS__webuploader/webuploader.main.js"></script>
<script type="text/javascript" src="__PLUGINS__webuploader/webuploader.custom.js"></script>

<?php
$qiniu_get_info = unserialize(file_get_contents('qiniu.php'));
?>
{if $qiniu_get_info['ltype'] ==1}
<script>
$(function() {
       $('.wu-example-one').createUpload('one',"http://up.qiniu.com/");
       $('.wu-example').createUpload('list',"http://up.qiniu.com/");
        $('.wu-example-file').createUpload('file',"http://up.qiniu.com/");
        });
</script>
{else/}
<script>
$(function() {
        $('.wu-example-one').createUpload('one','{:U('AjaxUploads/img')}');
        $('.wu-example').createUpload('list', '{:U('AjaxUploads/img')}');
        $('.wu-example-file').createUpload('file', '{:U('AjaxUploads/file')}');
        });
</script>
{/if}


{block name="script"}
{/block}

</body>
</html>
